<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
<%@ taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@ taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<f:view>
		<a4j:form>
			<rich:panel id="panel"
				style="width:250px; margin:auto; margin-top:20%">
				<f:facet name="header">
					<h:outputText value="Connexion" />
				</f:facet>
				<table style="text-align: center;">
					<tr>
						<td>Username :</td>
						<td>
							<h:inputText value="#{mbConnexion.username }"/>
						</td>
					</tr>
					<tr>
						<td>Mot de passe :</td>
						<td>
							<h:inputSecret value="#{mbConnexion.password }"/>
						</td>
					</tr>
					<tr align="center">
						<td colspan="2">
							<h:commandButton value="Connecter" action="#{mbConnexion.connexion }" />
						</td>
					</tr>
				</table>
			</rich:panel>
			<rich:panel rendered="#{not empty mbConnexion.errorLogin }">
				<h:outputText rendered="#{not empty mbConnexion.errorLogin }" value="#{mbConnexion.errorLogin }"
					style="font-color:red;" />
			</rich:panel>
		</a4j:form>
	</f:view>
</body>
</html>